package fiado.util;

import java.awt.Component;

import javax.swing.SwingUtilities;
import javax.swing.UIManager;


public class SwingUtil {

	public static void tentaSetaNimbus(Component comp) {
		UIManager.LookAndFeelInfo[] looks = UIManager.getInstalledLookAndFeels();
		for (UIManager.LookAndFeelInfo look :looks) {
			if (look.getClassName().matches("(?i).*nimbus.*")) {
				try {
					UIManager.setLookAndFeel(look.getClassName());
					SwingUtilities.updateComponentTreeUI(comp);
					return;
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		}
	}
}
